package com.bee.study.web;

import com.bee.study.api.ApiFactory;
import com.bee.study.api.ApiInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0.0
 * @Author yong.Mr
 * @data 2019-8-9
 */
@RestController
@RequestMapping("/factory")
public class TestFactory {

    @Autowired
    private ApiFactory apiFactory;

    @RequestMapping("/mode")
    public String TestFactoryMode() {
        ApiInterface item = apiFactory.findByName("item");

        return item.test();
    }
}
